From 529fbf5300a215c74dbd43f360ca644146db3b0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Steinbrink?= Date: Tue, 23 Sep 2014 20:27:48 +0200 Subject: [PATCH] Fix building with current rustc --- Cargo.lock | 42 ++++++++++++++++++++-------------------- src/cargo/lib.rs | 2 +- src/cargo/util/config.rs | 10 +++++----- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c37129fc3..fe699510a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,16 +3,16 @@ name = "cargo" version = "0.0.1-pre" dependencies = [ "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)", - "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)", - "docopt_macros 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)", - "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#a59b2a103642550bc1500c302c5031479ec7d9e1)", - "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879)", - "glob 0.0.1 (git+https://github.com/rust-lang/glob#ce24c37f268c4a31238dbe3b8e9ff8fe5342f0be)", + "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)", + "docopt_macros 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)", + "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d)", + "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72)", + "glob 0.0.1 (git+https://github.com/rust-lang/glob#2bcf0fcf0d19705cce3cb89fa8930397feea782d)", "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b8622d54587590f324b97cc98)", "semver 0.1.0 (git+https://github.com/rust-lang/semver#c88a711f543c57368be347686a549aa4254ec48f)", - "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#b2391703d54afd20c999d5531c4ed46bcf366f23)", - "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#22ad6e7ea9f2a81aac3ba9e427dd8a1036453486)", - "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)", + "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#ff855f27be0394bac944d62914683c0d00ba0fa3)", + "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] @@ -22,7 +22,7 @@ source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c73 dependencies = [ "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)", "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#1d3cd271612036b47c015a55f33a97e1524569ae)", - "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] @@ -33,14 +33,14 @@ source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c73 [[package]] name = "docopt" version = "0.6.3" -source = "git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736" +source = "git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02" [[package]] name = "docopt_macros" version = "0.6.3" -source = "git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736" +source = "git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02" dependencies = [ - "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)", + "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)", ] [[package]] @@ -51,21 +51,21 @@ source = "git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b [[package]] name = "flate2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/flate2-rs#a59b2a103642550bc1500c302c5031479ec7d9e1" +source = "git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d" [[package]] name = "git2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879" +source = "git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72" dependencies = [ - "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879)", - "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)", + "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] name = "glob" version = "0.0.1" -source = "git+https://github.com/rust-lang/glob#ce24c37f268c4a31238dbe3b8e9ff8fe5342f0be" +source = "git+https://github.com/rust-lang/glob#2bcf0fcf0d19705cce3cb89fa8930397feea782d" [[package]] name = "hamcrest" @@ -75,7 +75,7 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b86 [[package]] name = "libgit2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879" +source = "git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72" dependencies = [ "libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys#6a5d3ad7b62db6ca0721c528402f4976a1876036)", "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#1d3cd271612036b47c015a55f33a97e1524569ae)", @@ -105,17 +105,17 @@ source = "git+https://github.com/rust-lang/semver#c88a711f543c57368be347686a549a [[package]] name = "tar" version = "0.0.1" -source = "git+https://github.com/alexcrichton/tar-rs#b2391703d54afd20c999d5531c4ed46bcf366f23" +source = "git+https://github.com/alexcrichton/tar-rs#ff855f27be0394bac944d62914683c0d00ba0fa3" [[package]] name = "toml" version = "0.1.0" -source = "git+https://github.com/alexcrichton/toml-rs#22ad6e7ea9f2a81aac3ba9e427dd8a1036453486" +source = "git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f" [[package]] name = "url" version = "0.1.0" -source = "git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f" +source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243" dependencies = [ "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", ] diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index 99a15bb0b..f3fa578a7 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -77,7 +77,7 @@ pub mod ops; pub mod sources; pub mod util; -trait RepresentsJSON : Decodable {} +pub trait RepresentsJSON : Decodable {} impl> RepresentsJSON for T {} pub fn execute_main<'a, diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index 6c2918ade..0d21145a2 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -1,4 +1,4 @@ -use std::{fmt, os, result, mem}; +use std::{fmt, os, mem}; use std::io::fs::{PathExtensions, File}; use std::collections::HashMap; use std::string; @@ -139,18 +139,18 @@ impl ConfigValue { toml::String(val) => Ok(String(val, path.clone())), toml::Boolean(b) => Ok(Boolean(b, path.clone())), toml::Array(val) => { - Ok(List(try!(result::collect(val.move_iter().map(|toml| { + Ok(List(try!(val.into_iter().map(|toml| { match toml { toml::String(val) => Ok((val, path.clone())), _ => Err(internal("")), } - }))))) + }).collect::>()))) } toml::Table(val) => { - Ok(Table(try!(result::collect(val.move_iter().map(|(key, value)| { + Ok(Table(try!(val.into_iter().map(|(key, value)| { let value = raw_try!(ConfigValue::from_toml(path, value)); Ok((key, value)) - }))))) + }).collect::>()))) } _ => return Err(internal("")) } -- 2.30.2